/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BASE */
html,
body {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Quicksand', sans-serif;
    line-height: 1.7;
    color: #444;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

/* CONTENEDOR */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TIPOGRAFÍAS */
h1,
h2,
h3 {
    font-family: 'Caveat', cursive;
}

/* =========================
   HEADER / HERO
========================= */

header {
    background: linear-gradient(45deg, #e1bee7 0%, #f3e8ff 100%);
    text-align: center;
    padding: 3rem 0 4rem;
    position: relative;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
}

.hero-logo {
    height: 175px;
    width: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.03);
}

.brand-signature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.logo-signature {
    font-family: 'Caveat', cursive;
    font-size: 2.1rem;
    letter-spacing: 1px;
    color: #b76e79;
    margin-top: 0.2rem;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.95rem;
    color: #7b7280;
    letter-spacing: 1px;
    font-style: italic;
    font-family: 'Quicksand', sans-serif;
}

.hero-text {
    color: #444;
    font-size: 1rem;
    margin-top: 1rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtext {
    color: #666;
    font-size: .85rem;
    max-width: 700px;
    margin: 0.8rem auto 0;
    line-height: 1.7;
}

/* =========================
   NAVIGATION
========================= */

nav {
    background: linear-gradient(45deg, #ef4444 0%, #f87171 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.8rem 1.4rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* =========================
   MINI MAPA VISUAL
========================= */

.ecosystem-map {
    padding: 4rem 0 6rem;
    background: rgba(255,255,255,0.5);
}

.ecosystem-title {
    text-align: center;
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 3rem;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.ecosystem-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.ecosystem-card:hover {
    transform: translateY(-5px);
}

.ecosystem-card span {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.ecosystem-card h3 {
    color: #ef4444;
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

.ecosystem-card p {
    color: #666;
    font-size: 0.95rem;
}

/* =========================
   MAIN SECTIONS
========================= */

main {
    flex: 1 0 auto;
}

.section {
    padding: 5rem 0;
    position: relative;
}

#sobre-mi {
    background: rgba(255,255,255,0.65);
}

#proyectos {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(243,232,255,0.35) 15%,
        rgba(243,232,255,0.5) 100%
    );
}
#blog {
    background: rgba(255,247,237,0.55);
}

#contacto {
    background: rgba(255,255,255,0.65);
}

/* TITULOS */

.section-title {
    text-align: center;
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 3rem;
}

.section-title::after {
    content: "✿ ❀ ✿";
    display: block;
    margin-top: 0.5rem;
    color: #ec4899;
    font-size: 1.3rem;
}

/* =========================
   INTRO / FRASE
========================= */

.welcome-message {
    background: white;
    border-radius: 25px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.intro-text {
    font-size: 1.3rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.quote {
    max-width: 800px;
    margin: 3rem auto;
    text-align: center;
    font-style: italic;
    background: rgba(239,137,185,0.15);
    padding: 1.5rem;
    border-radius: 18px;
    color: #555;
}

/* =========================
   SOBRE MI
========================= */

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.profile-image {
    display: flex;
    justify-content: center;
}

.profile-image img {
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.about-text {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-left: 5px solid #ef4444;
    font-size: 1.1rem;
}

/* =========================
   PROYECTOS
========================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
    align-items: stretch;
}

.projects-intro {
    text-align: center;
    max-width: 700px;
    margin: -1rem auto 3rem;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

.project-card {
    background: rgba(255,255,255,0.92);
    padding: 2rem;
    border-radius: 24px;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 290px;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card:nth-child(1) {
    border-top: 5px solid #ef4444;
}

.project-card:nth-child(2) {
    border-top: 5px solid #c084fc;
}

.project-card:nth-child(3) {
    border-top: 5px solid #ec4899;
}

.project-card h3 {
    font-size: 1.7rem;
    margin-bottom: 1.2rem;
    color: #ef4444;
    line-height: 1.2;
}

.project-card p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1rem;
}

.project-link {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    border-radius: 30px;
    background: linear-gradient(45deg, #ef4444 0%, #ec4899 100%);
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(239,68,68,0.2);
}

/* =========================
   BLOG
========================= */

.blog-preview {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-post {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-left: 4px solid #ec4899;
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-4px);
}

.blog-post h3 {
    color: #c084fc;
    margin-bottom: 0.8rem;
    font-size: 1.6rem;
}

.blog-post p {
    color: #555;
    line-height: 1.7;
}

/* =========================
   CONTACTO
========================= */

.contact-dropdown {
    position: relative;
    display: inline-block;
}

.contact-trigger {
    background: linear-gradient(45deg, #ef4444 0%, #ec4899 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
    position: relative;
}

.contact-trigger:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.contact-trigger::after {
    content: "❀";
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: #c084fc;
    font-size: 1.5rem;
    opacity: 0.8;
}

.dropdown-form {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-top: 4px solid #c084fc;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.4s ease;
    z-index: 1000;
    margin-top: 10px;
}

.contact-dropdown:hover .dropdown-form {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.form-container {
    padding: 2rem;
    position: relative;
}

.form-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ef4444;
    font-family: 'Georgia', serif;
    position: relative;
}

.form-title::after {
    content: "✿";
    display: block;
    color: #ec4899;
    font-size: 1.2rem;
    margin-top: 0.3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #333;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c084fc;
    background: white;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-submit {
    background: linear-gradient(45deg, #c084fc 0%, #ec4899 100%);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    align-self: center;
}

.form-submit:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 5px 15px rgba(192, 132, 252, 0.4);
}

.form-submit:active {
    transform: scale(1.02);
}

/* Decoración sutil */
.form-container::before {
    content: "♡";
    position: absolute;
    top: 10px;
    right: 20px;
    color: #ef4444;
    font-size: 1.5rem;
    opacity: 0.6;
}

/* Flecha indicadora en el formulario */
.dropdown-form::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #c084fc;
}

/* Estados de validación */
.form-group input:valid,
.form-group textarea:valid {
    border-color: #10b981;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown),
.form-group textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
}

/* Mantener el formulario abierto al interactuar con él */
.dropdown-form:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .dropdown-form {
        width: 320px;
        left: 0;
        transform: none;
        margin-left: 0;
    }
    
    .contact-dropdown:hover .dropdown-form {
        transform: translateY(0);
    }
    
    .dropdown-form:hover {
        transform: translateY(0);
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-container::before {
        display: none;
    }
    
    .contact-trigger::after {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .form-container::before,
    .form-container::after {
        display: none;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #c084fc 0%, #ec4899 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* Icono de flecha hacia arriba */
.scroll-to-top::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid white;
}

.social-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(45deg, #e1bee7 0%, #d7b6f9 85%);
    padding: 15px 8px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #ef4444 0%, #ec4899 100%);  /* Color base uniforme */
    color: white;
    transition: background-color 0.3s ease;
}

.social-btn:hover {
    background-color: #db2777;  /* Variante al hacer hover */
}

.social-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

/* Efectos hover */
.social-btn:hover {
    transform: scale(1.15) translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.social-btn:hover svg {
    transform: scale(1.1);
}

/* Efecto de ondas al hacer hover */
.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-btn:hover::before {
    transform: scale(1);
}

/* Decoración */
.social-decoration {
    font-size: 1.5rem;
    color: #ec4899;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
    margin-top: 10px;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Tooltips */
.social-btn::after {
    content: attr(aria-label);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Georgia', serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.social-btn:hover::after {
    opacity: 1;
    visibility: visible;
    left: 55px;
}

/* Responsive - ocultar en móviles pequeños */
@media (max-width: 768px) {
    .social-sidebar {
        left: 10px;
        transform: translateY(-50%) scale(0.9);
    }
    
    .social-buttons {
        padding: 12px 6px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
    }
    
    .social-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .social-btn::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .social-sidebar {
        display: none;
    }
}

/* =========================
   FOOTER
========================= */

footer {
    background: linear-gradient(180deg, #fdf4ff 0%, #f9fafb 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    color: #444;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-line {
    width: 90px;
    height: 2px;
    background: linear-gradient(90deg, #ec4899, #c084fc);
    border-radius: 10px;
    margin-bottom: 0.7rem;
}

.footer-name {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: #c084fc;
    letter-spacing: 2px;
}
.footer-quote {
    color: #666;
    font-style: italic;
    max-width: 500px;
    line-height: 1.7;
}

.footer-copy {
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 1px;
}

.footer-symbols {
    display: flex;
    gap: 1rem;
    font-size: 1.4rem;
    color: #ec4899;
    opacity: 0.8;
}

/* =========================
   DECORACIÓN
========================= */

.decorative-element {
    position: absolute;
    opacity: 0.2;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.flower-left {
    top: 20%;
    left: 5%;
}

.flower-right {
    top: 60%;
    right: 5%;
}

.heart-decoration {
    top: 10%;
    right: 10%;
    color: #ef4444;
    font-size: 3rem;
}

/* ANIMACIÓN */

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

    .hero-title {
        font-size: 3rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section-title {
        font-size: 2.3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-form {
        width: 90vw;
    }

    .decorative-element {
        display: none;
    }

    nav ul {
        gap: 0.8rem;
    }

    nav a {
        padding: 0.7rem 1rem;
    }
}